package(
    default_visibility = ["//visibility:public"],
)

licenses(["notice"])  # Apache 2.0

load(
    "//mace:mace.bzl",
    "if_android",
    "if_android_armv7",
    "if_hexagon_enabled",
    "if_neon_enabled",
    "if_opencl_enabled",
    "if_quantize_enabled",
    "if_rpcmem_enabled",
)

cc_library(
    name = "ccutils",
    testonly = 1,
    srcs = glob([
        "mace/ops/*.cc",
    ]),
    hdrs = glob([
        "mace/ops/*.h",
        "mace/ops/testing/*.h",
    ]),
    copts = [
        "-Werror",
        "-Wextra",
    ] + if_neon_enabled([
        "-DMACE_ENABLE_NEON",
    ]) + if_android_armv7([
        "-mfpu=neon-fp16",
    ]) + if_android_armv7([
        "-mfloat-abi=softfp",
    ]) + if_opencl_enabled([
        "-DMACE_ENABLE_OPENCL",
    ]) + if_hexagon_enabled([
        "-DMACE_ENABLE_HEXAGON",
    ]) + if_rpcmem_enabled([
        "-DMACE_ENABLE_RPCMEM",
    ]),
    strip_include_prefix = "",
    deps = [
        "//mace/libmace",
        "@gtest",
    ],
)
